import { 
  HOME_PATH, 
  GRAPHICS_TEST_PATH,
  COLOR_TEST_PATH,
  NUMBER_TEST_PATH,
  LETTER_TEST_PATH,
  CHINESE_TEST_PATH,
  CUBE_OBSERVATION_PATH,
  CUBE_MEMORY_PATH,
  PAGE_TITLES,
  PAGE_DESCRIPTIONS,
  DEFAULT_ROUTE_META 
} from '../constants';

// 导入页面组件
import HomePage from '../../page/index';
import GraphicsTestPage from '../../page/graphicsTest';
import GraphicsTestInterface from '../../page/graphicsTest/graphicsTest';
import GraphicsTestResult from '../../page/graphicsTest/graphicsTestResult';
import ColorTestPage from '../../page/colorTest';
import NumberTestPage from '../../page/numberTest';
import LetterTestPage from '../../page/letterTest';
import ChineseTestPage from '../../page/chineseTest';
import CubeObservationPage from '../../page/cubeObservation';
import CubeMemoryPage from '../../page/cubeMemory';

/**
 * 移动端路由配置
 */
export const mobileRoutes = [
  {
    path: HOME_PATH,
    name: '首页',
    component: HomePage,
    exact: true,
    meta: {
      ...DEFAULT_ROUTE_META,
      title: PAGE_TITLES[HOME_PATH],
      description: PAGE_DESCRIPTIONS[HOME_PATH],
      keepAlive: true,
      affix: true,
      sort: 1,
    },
  },
  {
    path: GRAPHICS_TEST_PATH,
    name: '图形测试',
    component: GraphicsTestPage,
    exact: true,
    meta: {
      ...DEFAULT_ROUTE_META,
      title: PAGE_TITLES[GRAPHICS_TEST_PATH],
      description: PAGE_DESCRIPTIONS[GRAPHICS_TEST_PATH],
      keepAlive: true,
      affix: false,
      sort: 2,
    },
  },
  {
    path: '/graphics-test/test',
    name: '图形测试界面',
    component: GraphicsTestInterface,
    exact: true,
    meta: {
      ...DEFAULT_ROUTE_META,
      title: '图形测试进行中',
      description: '图形测试界面',
      keepAlive: false,
      affix: false,
      sort: 2.1,
    },
  },
  {
    path: '/graphics-test/result',
    name: '图形测试结果',
    component: GraphicsTestResult,
    exact: true,
    meta: {
      ...DEFAULT_ROUTE_META,
      title: '测试结果',
      description: '图形测试结果页面',
      keepAlive: false,
      affix: false,
      sort: 2.2,
    },
  },
  {
    path: COLOR_TEST_PATH,
    name: '颜色测试',
    component: ColorTestPage,
    exact: true,
    meta: {
      ...DEFAULT_ROUTE_META,
      title: PAGE_TITLES[COLOR_TEST_PATH],
      description: PAGE_DESCRIPTIONS[COLOR_TEST_PATH],
      keepAlive: true,
      affix: false,
      sort: 3,
    },
  },
  {
    path: NUMBER_TEST_PATH,
    name: '数字测试',
    component: NumberTestPage,
    exact: true,
    meta: {
      ...DEFAULT_ROUTE_META,
      title: PAGE_TITLES[NUMBER_TEST_PATH],
      description: PAGE_DESCRIPTIONS[NUMBER_TEST_PATH],
      keepAlive: true,
      affix: false,
      sort: 4,
    },
  },
  {
    path: LETTER_TEST_PATH,
    name: '字母测试',
    component: LetterTestPage,
    exact: true,
    meta: {
      ...DEFAULT_ROUTE_META,
      title: PAGE_TITLES[LETTER_TEST_PATH],
      description: PAGE_DESCRIPTIONS[LETTER_TEST_PATH],
      keepAlive: true,
      affix: false,
      sort: 5,
    },
  },
  {
    path: CHINESE_TEST_PATH,
    name: '汉字测试',
    component: ChineseTestPage,
    exact: true,
    meta: {
      ...DEFAULT_ROUTE_META,
      title: PAGE_TITLES[CHINESE_TEST_PATH],
      description: PAGE_DESCRIPTIONS[CHINESE_TEST_PATH],
      keepAlive: true,
      affix: false,
      sort: 6,
    },
  },
  {
    path: CUBE_OBSERVATION_PATH,
    name: '魔方与观测力',
    component: CubeObservationPage,
    exact: true,
    meta: {
      ...DEFAULT_ROUTE_META,
      title: PAGE_TITLES[CUBE_OBSERVATION_PATH],
      description: PAGE_DESCRIPTIONS[CUBE_OBSERVATION_PATH],
      keepAlive: true,
      affix: false,
      sort: 7,
    },
  },
  {
    path: CUBE_MEMORY_PATH,
    name: '魔方与记忆力',
    component: CubeMemoryPage,
    exact: true,
    meta: {
      ...DEFAULT_ROUTE_META,
      title: PAGE_TITLES[CUBE_MEMORY_PATH],
      description: PAGE_DESCRIPTIONS[CUBE_MEMORY_PATH],
      keepAlive: true,
      affix: false,
      sort: 8,
    },
  },
];
